package com.ruoyi.web.controller.wokerSys;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.worker.domain.workAttendance.RzAttendanceSalarySum;
import com.ruoyi.worker.service.workerSys.IRzAttendanceSalarySumService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @ClassName RzAttendanceSalarySumController
 * @Description
 * @Author leizhang
 * Date 2021/11/28 11:41 下午
 * @Version 1.0
 **/
@RestController
@RequestMapping("/attendanceSalarySumApi")
public class RzAttendanceSalarySumApi extends BaseController {
    @Autowired
    private IRzAttendanceSalarySumService rzAttendanceSalarySumService;

    /**
     * @Description : 列表数据查询
     * @Author : leizhang
     * @Date 11:42 下午 2021/11/28
     * @param rzAttendanceSalarySum
     * @return TableDataInfo
     **/
    @GetMapping("/list")
    public TableDataInfo list(RzAttendanceSalarySum rzAttendanceSalarySum) {
        startPage();
        List<RzAttendanceSalarySum> list = rzAttendanceSalarySumService.selectRzAttendanceSalarySumList(rzAttendanceSalarySum);
        return getDataTable(list);
    }

    /**
     * 批量删除
     */
    @Log(title = "批量删除工资单", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(rzAttendanceSalarySumService.deleteRzAttendanceSalarySumByIds(ids));
    }

}